﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>企业资质澄清查看（配送企业端）</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %> 
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <!-- 操作列更多弹窗 -->
    <div class="box box-primary" id="more" style="width:100px;height:35px;background-color:#2C3B41;position:absolute;z-index:9999;left:850px;top:100px;display:none;font-size:12px;border-top-color:#2C3B41;">
            <div class="box-body home-message" id="moreOp">
            </div>
    </div>

    <section class="content-header">
        <h1>企业资质澄清查看</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">招标采购管理</a></li>
            <li class="active"><a href="#">投标企业信息管理</a></li>
            <li class="active"><a href="#">企业资质澄清查看</a></li>
        </ol>
    </section>
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class=" form-inline">
                     <div class="form-group form-group-xs">
                        <label>项目名称：</label>
                        <select class="form-control" style="width:220px;" id="projId" name="projId"></select>
                    </div>
                     
                    <button type="button" onclick="gridSerch();" class="btn btn-success btn-sm"> 查&nbsp;询</button>
                </div>
            </div>
        </div>
        <table class="jqgrid" id="gridlist"></table>
       <div class=" box box-warning bottongroup"></div>
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp" %> 
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "${ctx}/prodProfile/getProfileComplainResultListList.html",
                mtype: "POST",
                datatype: "json",
                autowidth: true,
               // shrinkToFit:false,
                height: 270,
                colNames: [ 'projId', '操作','项目名称', '公示开始日期', '公示结束日期', '通过数目', '未通过数目'],
                colModel: [
                    { name: 'projId', width: 120 ,hidden:true, align:"center",sortable: false},
                    { name: 'operate', width: 80 , align:"center" ,sortable: false, 
                        formatter : function(val, opts, rowdata) {
                            var str = "";
                            if(rowdata.complainPubEndtime >= "${date}" && rowdata.complainPubEndtime != null  && rowdata.complainPubStarttime <= "${date}" && rowdata.complainPubStarttime != null ){
                            	str +="<a href='${ctx}/bidProjcompprofile/toComplainResult.html?projId=" + rowdata.projId + "' >查看</a>";
                            }
                            return str;
                        }
                    },
                    { name: 'name', width: 180 , align:"left",sortable: false},
                    { name: 'complainPubStarttime', width: 160 , align:"center" ,sortable: false},
                    { name: 'complainPubEndtime', width: 160 , align:"center" ,sortable: false},
                    { name: 'settleApproveCount', width: 80 , align:"center" ,sortable: false},
                    { name: 'settleUnsettleCount', width: 80 , align:"center" ,sortable: false}
                ],
                rowNum: 0,
                rownumbers: true,
                viewrecords: true,
                caption: "采购项目列表",
                jsonReader: {
                    repeatitems: false,
                    id: "projId"
                },
                loadComplete: function (data) { //完成服务器请求后，回调函数
                	formatSelect("#projId",data.rows);
                	if(data.rows){
                		var projId =  data.conditions.defalutProjId;
       					if(projId!=null && projId!=""){
       	                	$("#projId").find("option").each(function(){
       	                			if($.trim($(this).val()) == $.trim(projId)){
       	                    			$(this).attr("selected",true).parents("#projId").attr("disabled","disabled");
       	                    			return;
       	                    		}
       	                	 }); 
                    		}
                	}else{
                		var projId =  data.conditions.defalutProjId;
       					if(projId!=null && projId!=""){
       	                	$("#projId").find("option").each(function(){
       	                			if($.trim($(this).val()) == $.trim(projId)){
       	                    			$(this).attr("selected",true).parents("#projId").attr("disabled","disabled");
       	                    			return;
       	                    		}
       	                	 }); 
                    		}else{
                    		  $.HN.message.alert("暂无招标目录数据", "消息", "info");
                    		}
                	}
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");  
            
        });
        

        //查询
        function gridSerch() {
            var projCode = $.trim($("#projCode").val());
            var name = $.trim( $("#name").val());
            $("#gridlist").jqGrid('setGridParam',{  
                datatype:'json',
                postData:{"projCode":projCode,
                        "name":name}
            }).trigger("reloadGrid"); //重新载入  
        }
        
        
        
 
    </script>
</body>
</html>